package collections;

public class DualNode {

		private DualNode nextNode;
		private DualNode prevNode;
		private int value = 0;
		public DualNode(int val, DualNode prev, DualNode next){
			value = val;
			prevNode = prev;
			nextNode = next;
		}
		public DualNode(){
			this(0,null,null);
		}
		public DualNode(int val,DualNode prev){
			this(val,prev,null);
		}
		public DualNode(DualNode prev){
			this(0,prev,null);
		}
		public DualNode(int val){
			this(val,null,null);
		}
		public DualNode(DualNode prev, DualNode next){
			this(0,prev,next);
		}
		void setPrev(DualNode prev){
			prevNode = prev;
		}
		DualNode getPrev(){
			return prevNode;
		}
		void setNext(DualNode next){
			nextNode = next;
		}
		DualNode getNext(){
			return nextNode;
		}
		void setVal(int val){
			value = val;
		}
		int getVal(){
			return value;
		}
		
}
